#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
	int num;
	cin >> num;
	int *arr = (int *)malloc(sizeof(int)* num);
	for(int i = 0;i<num;i++){
		cin >> arr[i];
	}
	
	int min_num = arr[0];
	for(int i = 0;i<num;i++){
		if(arr[i]<min_num){
			min_num = arr[i];
		}
	}
	
	cout << min_num;
	
	return 0;
}
